package com.me.pikachu.main;

import com.badlogic.gdx.assets.AssetManager;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.utils.Array;

public class Asset {

	public static AssetManager manager = new AssetManager();

	public static Array<Texture> pokemon;
	public static Array<Texture> squares;

	public static void loadAssest() {
		load();
	}

	private static void load() {
		// load pokemon
		for (int i = 1; i <= 48; i++) {
			String file = "images/pokemon/p_" + i + "_cap1.png";
			manager.load(file, Texture.class);
		}
		// load square
		for (int i = 1; i <= 3; i++) {
			String file = "images/squares/square_" + i + ".png";
			manager.load(file, Texture.class);
		}
		for (int i = 1; i <= 3; i++) {
			String file = "images/squares/squarec_" + i + ".png";
			manager.load(file, Texture.class);
		}
	}

	public static void getPokemon() {
		pokemon = new Array<Texture>();
		for (int i = 1; i <= 48; i++) {
			String file = "images/pokemon/p_" + i + "_cap1.png";
			Texture txture = manager.get(file, Texture.class);
			pokemon.add(txture);
		}
	}

	public static void getSquares() {
		squares = new Array<Texture>();
		for (int i = 1; i <= 3; i++) {
			String file = "images/squares/square_" + i + ".png";
			Texture txture = manager.get(file, Texture.class);
			squares.add(txture);
		}
		for (int i = 1; i <= 3; i++) {
			String file = "images/squares/squarec_" + i + ".png";
			Texture txture = manager.get(file, Texture.class);
			squares.add(txture);
		}
	}

}
